package pers.amos.eshop.mapper;

import org.apache.ibatis.annotations.Param;
import pers.amos.eshop.model.ProductInventory;

/**
 * @author amos wong
 * @create 2020-11-14 4:00 下午
 *
 * 商品库存mapper
 */

public interface ProductInventoryMapper {

    /**
     * 更新商品库存的数量
     * @param productInventory
     */
    void updateProductInventory(@Param("productInventory") ProductInventory productInventory);

    /**
     * 根据商品id查询商品库存的方法
     * @param productId
     * @return
     */
    ProductInventory findProductInventoryByProductId(Long productId);
}
